home *** CD-ROM | disk | FTP | other *** search
Wrap
/* ** $VER: Fresco 1.0, IE Arexx script ** Image Engineer Macro script ** © by Patrik M Nydensten ** 10/11 1996 Stockholm/Sweden ** ** Builds a fresco version of primary image. ** Similar to the ADPro fresco script. */ Options results Signal on error /* Setup a place for errors to go */ if arg()==0 then exit med_vals = '3 3' Image1 = disperse(arg(1),1) 'MEDIAN' Image1 med_vals Image2 = Result 'CLOSE' Image1 Image3 = disperse(Image2,1) 'CLOSE' Image2 'MEDIAN' Image3 med_vals Image4 = Result 'CLOSE' Image3 Image5 = disperse(Image4,2) 'CLOSE' Image4 'MEDIAN' Image5 med_vals Image6 = Result 'CLOSE' Image5 'CONVOLVE' Image6 '"IE:Convolves/WoodCut"' OutputImage = Result 'CLOSE' Image6 exit /* Procedures */ disperse: parse arg in_image,distance 'NOISE' in_image '100 INTENSITY RANDOM' noise1=Result 'MARK' noise1 'ALPHA' 'MARK' in_image 'PRIMARY' 'DISPLACE' distance '0 BEST' disp1=Result 'CLOSE' noise1 'NOISE' in_image '100 INTENSITY RANDOM' noise2=RESULT 'MARK' noise2 'ALPHA' 'MARK' disp1 'PRIMARY' 'DISPLACE 0' distance 'BEST' disp2=Result 'CLOSE' noise2 'CLOSE' disp1 return strip(disp2) /*******************************************************************/ /* This is where control goes when an error code is returned by IE */ /* It puts up a message saying what happened and on which line */ /*******************************************************************/ error: if RC=5 then do /* Did the user just cancel us? */ IE_TO_FRONT LAST_ERROR 'REQUEST "'||RESULT||'"' exit end else do IE_TO_FRONT LAST_ERROR 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!' exit end